<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libxlsxwriter: Working with Data Validation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libxlsxwriter
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Working with Data Validation </div>  </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#ww_data_validate_functions">The data validation functions</a></li>
<li class="level1"><a href="#ww_data_validate_struct">The lxw_data_validation struct</a><ul><li class="level2"><a href="#ww_data_validate_validate">validate</a></li>
<li class="level2"><a href="#ww_data_validate_criteria">criteria</a></li>
<li class="level2"><a href="#ww_data_validate_value">value, minimum, maximum</a></li>
</ul>
</li>
<li class="level1"><a href="#ww_data_validate_options">Data validation options</a><ul><li class="level2"><a href="#ww_data_validate_ignore_blank">ignore_blank</a></li>
<li class="level2"><a href="#ww_data_validate_dropdown">dropdown</a></li>
<li class="level2"><a href="#ww_data_validate_input_title">input_title</a></li>
<li class="level2"><a href="#ww_data_validate_input_message">input_message</a></li>
<li class="level2"><a href="#ww_data_validate_show_input">show_input</a></li>
<li class="level2"><a href="#ww_data_validate_error_title">error_title</a></li>
<li class="level2"><a href="#ww_data_validate_error_message">error_message</a></li>
<li class="level2"><a href="#ww_data_validate_error_type">error_type</a></li>
<li class="level2"><a href="#ww_data_validate_show_error">show_error</a></li>
</ul>
</li>
<li class="level1"><a href="#ww_data_validate_examples">Examples</a></li>
</ul>
</div>
<div class="textblock"><p>Data validation is a feature of Excel which allows restrictions to be placed on the data that a user enters in a cell and to display associated help and warning messages. It can also be used to restrict input to values in a drop down list.</p>
<p>A typical use case might be to restrict data in a cell to integer values in a certain range, to provide a help message to indicate the required value and to issue a warning if the input data doesn't meet the stated criteria. In <code>libxlsxwriter</code> this can be done as follows:</p>
<div class="fragment"><div class="line"><a class="code" href="structlxw__data__validation.html">lxw_data_validation</a> *data_validation = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="structlxw__data__validation.html">lxw_data_validation</a>));</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 10;</div>
<div class="line"> </div>
<div class="line"><a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B3&quot;</span>), data_validation);</div>
</div><!-- fragment --><div class="image">
<img src="data_validate1.png" alt=""/>
</div>
<p>If the user inputs a value that doesn't match the specified criteria an error message is displayed:</p>
<div class="image">
<img src="data_validate4.png" alt=""/>
</div>
<p>For more information on data validation see the Microsoft support article <a href="http://support.microsoft.com/kb/211485">Description and examples of data validation in Excel</a>.</p>
<p>The following sections describe how to use the <code><a class="el" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0" title="Add a data validation to a cell.">worksheet_data_validation_cell()</a></code> and <code><a class="el" href="worksheet_8h.html#a14f482010dd0f817e17001d01644a57f" title="Add a data validation to a range.">worksheet_data_validation_range()</a></code> functions and the various options of <a class="el" href="structlxw__data__validation.html" title="Worksheet data validation options.">lxw_data_validation</a>.</p>
<h1><a class="anchor" id="ww_data_validate_functions"></a>
The data validation functions</h1>
<p>The <code><a class="el" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0" title="Add a data validation to a cell.">worksheet_data_validation_cell()</a></code> and <code><a class="el" href="worksheet_8h.html#a14f482010dd0f817e17001d01644a57f" title="Add a data validation to a range.">worksheet_data_validation_range()</a></code> functions are used to construct an Excel data validation.</p>
<p>The data validation can be applied to a single cell or a range of cells:</p>
<div class="fragment"><div class="line"><a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>( worksheet, 2, 1,       data_validation);</div>
<div class="line"><a class="code" href="worksheet_8h.html#a14f482010dd0f817e17001d01644a57f">worksheet_data_validation_range</a>(worksheet, 2, 1, 4, 1, data_validation);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Same as above using the CELL() and RANGE() macros.</span></div>
<div class="line"><a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>( worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B3&quot;</span>),     data_validation);</div>
<div class="line"><a class="code" href="worksheet_8h.html#a14f482010dd0f817e17001d01644a57f">worksheet_data_validation_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:B5&quot;</span>), data_validation);</div>
</div><!-- fragment --><p>The <a class="el" href="structlxw__data__validation.html" title="Worksheet data validation options.">lxw_data_validation</a> struct used in these functions is explained below.</p>
<h1><a class="anchor" id="ww_data_validate_struct"></a>
The lxw_data_validation struct</h1>
<p>The <a class="el" href="structlxw__data__validation.html" title="Worksheet data validation options.">lxw_data_validation</a> struct is used to set the properties of a data validation. A typical usage would look something like this:</p>
<div class="fragment"><div class="line"><a class="code" href="structlxw__data__validation.html">lxw_data_validation</a> *data_validation = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="structlxw__data__validation.html">lxw_data_validation</a>));</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 10;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a9afa5c82f4d99384298ed4d16facc5cb">show_input</a>   = <a class="code" href="worksheet_8h.html#a00c0cb6be9a2864d2a4cc977eadea74ba9d4f1bdb9ed0a87ffad0153c85feb786">LXW_VALIDATION_OFF</a>;</div>
</div><!-- fragment --><p>This example shows the main properties of <a class="el" href="structlxw__data__validation.html" title="Worksheet data validation options.">lxw_data_validation</a> and Excel data validations:</p>
<ul>
<li><code>validate</code>: The type of data to restrict the validation to. In this case it is whole numbers.</li>
<li><code>criteria</code>: The criteria by which the data will be evaluated. In this case whether the input is greater than a value.</li>
<li><code>value</code>: The value that the criteria applies to. This has several different versions for different types of data. This could also be a <code>minimum</code> and <code>maximum</code> value if the criteria used is a "BETWEEN" criteria. This is explained in the <a class="el" href="working_with_data_validation.html#ww_data_validate_value">value, minimum, maximum</a> section below.</li>
<li>Other options such as <code>show_input</code> or <code>input_message</code>. These parameters are explained in the <a class="el" href="working_with_data_validation.html#ww_data_validate_options">Data validation options</a> section.</li>
</ul>
<p>Note, in the examples in this document the <code>data_validation</code> variable is shown as dynamically allocated, however an address of a static or automatic variable could also be used. In these cases make sure that the struct members are initialized to zero before setting other parameters.</p>
<h2><a class="anchor" id="ww_data_validate_validate"></a>
validate</h2>
<p>The <code>validate</code> parameter is used to set the type of data that you wish to validate:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a> = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
</div><!-- fragment --><p>It is always required and it has no default value. In Excel the validate parameters are:</p>
<ul>
<li>Whole</li>
<li>Decimal</li>
<li>List</li>
<li>Date</li>
<li>Time</li>
<li>Text Length</li>
<li>Custom</li>
<li>Any</li>
</ul>
<p>The equivalent parameters in libxlsxwriter are defined in <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4c">lxw_validation_types</a>:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>: Restrict cell input to whole/integer numbers only.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca823e5e00d1a36b40579f998b4704ddb5">LXW_VALIDATION_TYPE_INTEGER_FORMULA</a>: Restrict cell input to whole/integer numbers only, using a cell reference.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a>: Restrict cell input to decimal numbers only.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4caaca4ee31d7b937dc130dd9623257a44a">LXW_VALIDATION_TYPE_DECIMAL_FORMULA</a>: Restrict cell input to decimal numbers only, using a cell reference.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>: Restrict cell input to a list of strings in a dropdown.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca4c4cbe18adcd6bef7cadf8f3b467b795">LXW_VALIDATION_TYPE_LIST_FORMULA</a>: Restrict cell input to a list of strings in a dropdown, using a cell range.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a>: Restrict cell input to date values only, using a <a class="el" href="structlxw__datetime.html" title="Struct to represent a date and time in Excel.">lxw_datetime</a> type.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4cacd6f3d9e53bf64c4c0988f1ead5384c2">LXW_VALIDATION_TYPE_DATE_FORMULA</a>: Restrict cell input to date values only, using a cell reference.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca5d77c63d440a5ecedc33ce41d7d60521">LXW_VALIDATION_TYPE_TIME</a>: Restrict cell input to time values only, using a <a class="el" href="structlxw__datetime.html" title="Struct to represent a date and time in Excel.">lxw_datetime</a> type.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca4a21e111494a0927a836e38037164296">LXW_VALIDATION_TYPE_TIME_FORMULA</a>: Restrict cell input to time values only, using a cell reference.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a>: Restrict cell input to strings of defined length, using a cell reference.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca84961de2afdce792c486f2171f5413eb">LXW_VALIDATION_TYPE_LENGTH_FORMULA</a>: Restrict cell input to strings of defined length, using a cell reference.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18">LXW_VALIDATION_TYPE_CUSTOM_FORMULA</a>: Restrict cell to input controlled by a custom formula that returns <code>TRUE/FALSE</code>.</li>
<li><a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4caa4f7be1cd3469867793125f32fc36902">LXW_VALIDATION_TYPE_ANY</a>: Allow any type of input. Mainly only useful for pop-up messages.</li>
</ul>
<h2><a class="anchor" id="ww_data_validate_criteria"></a>
criteria</h2>
<p>The <code>criteria</code> parameter is used to set the criteria by which the data in the cell is validated. It is almost always required except for the <code>list</code>, <code>custom</code> and <code>any</code> validate options. It has no default value:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a> = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
</div><!-- fragment --><p>Allowable values are defined in <a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5">lxw_validation_criteria</a>:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>: Select data between two values.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a>: Select data that is not between two values.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5c8d6a174e2dff4519a2991f9009c351">LXW_VALIDATION_CRITERIA_EQUAL_TO</a>: Select data equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5af0d45b3841976d2477203a9dc7361009">LXW_VALIDATION_CRITERIA_NOT_EQUAL_TO</a>: Select data not equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>: Select data greater than a value.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5ac6c585c5b61cf957cf1e88b8372ffc25">LXW_VALIDATION_CRITERIA_LESS_THAN</a>: Select data less than a value.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a97cc92910532a79dbf609e93bc01c07a">LXW_VALIDATION_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a>: Select data greater than or equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aedc85c3c49615ba6f20230db04bcfba8">LXW_VALIDATION_CRITERIA_LESS_THAN_OR_EQUAL_TO</a>: Select data less than or equal to a value.</li>
</ul>
<p>The <code>list</code>, <code>custom</code> and <code>any</code> validate options don't require a <code>criteria</code>. If you specify one it will be ignored.</p>
<h2><a class="anchor" id="ww_data_validate_value"></a>
value, minimum, maximum</h2>
<p>The <code>value</code> parameters are used to set the limiting value to which the <code>criteria</code> is applied. It is always required and it has no default value. There are different types of <code>value</code> parameter associated with different types of data. They are:</p>
<p><code>value_number</code>:</p>
<p>The <code>value_number</code> parameter is used to set the limiting value to which the criteria is applied using a whole or decimal number. It is typically used with <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a> and <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a> and <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a>.</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 0;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 10.5;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 3;</div>
</div><!-- fragment --><p><code>value_formula</code>:</p>
<p>The <code>value_formula</code> parameter is used to set the limiting value to which the criteria is applied using a cell reference. It is valid for any of the <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4c">lxw_validation_types</a> types that end in <code>_FORMULA</code>:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>      = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca823e5e00d1a36b40579f998b4704ddb5">LXW_VALIDATION_TYPE_INTEGER_FORMULA</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>      = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a> = <span class="stringliteral">&quot;=E3&quot;</span>;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>      = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca4a21e111494a0927a836e38037164296">LXW_VALIDATION_TYPE_TIME_FORMULA</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>      = LXW_VALIDATION_CRITERIA_EQUAL;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a> = <span class="stringliteral">&quot;=H1&quot;</span>;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>      = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca4c4cbe18adcd6bef7cadf8f3b467b795">LXW_VALIDATION_TYPE_LIST_FORMULA</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a> = <span class="stringliteral">&quot;=$E$4:$G$4&quot;</span>;</div>
</div><!-- fragment --><p><code>value_list</code>:</p>
<p>The <code>value_list</code> parameter is used to set a list of strings for a drop down list. The list should be a <code>NULL</code> terminated array of char* strings:</p>
<div class="fragment"><div class="line"><span class="keywordtype">char</span> *list[] = {<span class="stringliteral">&quot;open&quot;</span>, <span class="stringliteral">&quot;high&quot;</span>, <span class="stringliteral">&quot;close&quot;</span>, NULL};</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>   = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7168c44107ed6b5c63f6b701b69cc50b">value_list</a> = list;</div>
</div><!-- fragment --><p>Note, when using the <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a> validation with a list of strings, like in the last example above, Excel stores the strings internally as a Comma Separated Variable string. The total length for this string, including commas, cannot exceed the Excel limit of 255 characters. For longer sets of data you should use a range reference like the previous example above.</p>
<p><code>value_datetime</code>:</p>
<p>The <code>value_datetime</code> parameter is used to set the limiting value to which the <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a> or <a class="el" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca5d77c63d440a5ecedc33ce41d7d60521">LXW_VALIDATION_TYPE_TIME</a> criteria is applied using a <a class="el" href="structlxw__datetime.html" title="Struct to represent a date and time in Excel.">lxw_datetime</a> struct:</p>
<div class="fragment"><div class="line"><a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime1          = {2017,  9,  24,  0,  0, 0};</div>
<div class="line"><a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime2          = {   0,  0,   0, 12, 30, 0};</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = LXW_VALIDATION_CRITERIA_EQUAL;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a88b1a98df0ec6ca3509a2af95ff80b5e">value_datetime</a> = datetime1;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca5d77c63d440a5ecedc33ce41d7d60521">LXW_VALIDATION_TYPE_TIME</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = LXW_VALIDATION_CRITERIA_EQUAL;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a88b1a98df0ec6ca3509a2af95ff80b5e">value_datetime</a> = datetime2;</div>
</div><!-- fragment --><p>The <code>minimum</code> and <code>maximum</code> parameters are used to set the lower and upper limiting values when the <code>criteria</code> is either <a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a> or <a class="el" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a>. The parameters are:</p>
<ul>
<li><code>minimum_number</code></li>
<li><code>minimum_formula</code></li>
<li><code>minimum_datetime</code></li>
<li><code>maximum_number</code></li>
<li><code>maximum_formula</code></li>
<li><code>maximum_datetime</code></li>
</ul>
<p>They are similar to the <code>value</code> parameters described above. For example:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a>   = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a>   = 10;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a5103f918e00ebc26d50adda3b4cd3026">minimum_formula</a>  = <span class="stringliteral">&quot;=E3&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ab1acd165475bda9af44e8e27d93c0df3">maximum_formula</a>  = <span class="stringliteral">&quot;=F3&quot;</span>;</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a9879f8968affead0bc9245ade4ae32aa">minimum_datetime</a> = datetime1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aa1c41a46845b8dbbbba0c249517e9530">maximum_datetime</a> = datetime2;</div>
</div><!-- fragment --><h1><a class="anchor" id="ww_data_validate_options"></a>
Data validation options</h1>
<h2><a class="anchor" id="ww_data_validate_ignore_blank"></a>
ignore_blank</h2>
<p>The <code>ignore_blank</code> parameter is used to toggle on and off the 'Ignore blank' option in the Excel data validation dialog. When the option is on the data validation is not applied to blank data in the cell. It is on by default:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 10;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a1ca1d3d0e6fdf634034228713ef5d34c">ignore_blank</a>   = <a class="code" href="worksheet_8h.html#a00c0cb6be9a2864d2a4cc977eadea74ba9d4f1bdb9ed0a87ffad0153c85feb786">LXW_VALIDATION_OFF</a>;</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_data_validate_dropdown"></a>
dropdown</h2>
<p>The <code>dropdown</code> parameter is used to toggle on and off the 'In-cell dropdown' option in the Excel data validation dialog. When the option is on a dropdown list will be shown for <code>list</code> validations. It is on by default.</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>   = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7168c44107ed6b5c63f6b701b69cc50b">value_list</a> = list;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a18e5d9f622c710bd3997164f67871eb2">dropdown</a>   = <a class="code" href="worksheet_8h.html#a00c0cb6be9a2864d2a4cc977eadea74ba9d4f1bdb9ed0a87ffad0153c85feb786">LXW_VALIDATION_OFF</a>;</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_data_validate_input_title"></a>
input_title</h2>
<p>The <code>input_title</code> parameter is used to set the title of the input message that is displayed when a cell is entered. It has no default value and is only displayed if the input message is also displayed. See the <code>input_message</code> parameter below.</p>
<p>The maximum title length is 32 characters.</p>
<h2><a class="anchor" id="ww_data_validate_input_message"></a>
input_message</h2>
<p>The <code>input_message</code> parameter is used to set the input message that is displayed when a cell is entered. It has no default value:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 100;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">input_title</a>    = <span class="stringliteral">&quot;Enter an integer:&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">input_message</a>  = <span class="stringliteral">&quot;between 1 and 100&quot;</span>;</div>
</div><!-- fragment --><p>The input message generated from the above example is:</p>
<div class="image">
<img src="data_validate3.png" alt=""/>
</div>
<p>The message can be split over several lines using newlines. The maximum message length is 255 characters.</p>
<h2><a class="anchor" id="ww_data_validate_show_input"></a>
show_input</h2>
<p>The <code>show_input</code> parameter is used to toggle on and off the 'Show input message when cell is selected' option in the Excel data validation dialog. When the option is off an input message is not displayed even if it has been set using <code>input_message</code>. It is on by default.</p>
<h2><a class="anchor" id="ww_data_validate_error_title"></a>
error_title</h2>
<p>The <code>error_title</code> parameter is used to set the title of the error message that is displayed when the data validation criteria is not met. The default error title is 'Microsoft Excel'. The maximum title length is 32 characters.</p>
<h2><a class="anchor" id="ww_data_validate_error_message"></a>
error_message</h2>
<p>The <code>error_message</code> parameter is used to set the error message that is displayed when a cell is entered. The default error message is "The value you entered is not valid. A user has restricted values that can be entered into the cell". A non-default error message can be displayed as follows:</p>
<div class="fragment"><div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 100;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">input_title</a>    = <span class="stringliteral">&quot;Enter an integer:&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">input_message</a>  = <span class="stringliteral">&quot;between 1 and 100&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a3d2c14ba7d150130b18ee90e7bdea9c4">error_title</a>    = <span class="stringliteral">&quot;Input value is not valid!&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ad021ae9515ce8624db6819667dc10dc9">error_message</a>  = <span class="stringliteral">&quot;It should be an integer between 1 and 100&quot;</span>;</div>
</div><!-- fragment --><p>Which give the following message:</p>
<div class="image">
<img src="data_validate2.png" alt=""/>
</div>
<p>The message can be split over several lines using newlines. The maximum message length is 255 characters.</p>
<h2><a class="anchor" id="ww_data_validate_error_type"></a>
error_type</h2>
<p>The <code>error_type</code> parameter is used to specify the type of error dialog that is displayed. There are 3 <a class="el" href="worksheet_8h.html#a814e4b2e983125351c617e44b73b8998">lxw_validation_error_types</a> options:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a814e4b2e983125351c617e44b73b8998af2543462835dcdb58f6ff862613bb3ea">LXW_VALIDATION_ERROR_TYPE_STOP</a>, the default.</li>
<li><a class="el" href="worksheet_8h.html#a814e4b2e983125351c617e44b73b8998a53ca53803c257552740056bf44b18b98">LXW_VALIDATION_ERROR_TYPE_WARNING</a></li>
<li><a class="el" href="worksheet_8h.html#a814e4b2e983125351c617e44b73b8998a971dd668c9e360e76bde86a87fb373a7">LXW_VALIDATION_ERROR_TYPE_INFORMATION</a></li>
</ul>
<h2><a class="anchor" id="ww_data_validate_show_error"></a>
show_error</h2>
<p>The <code>show_error</code> parameter is used to toggle on and off the 'Show error alert after invalid data is entered' option in the Excel data validation dialog. When the option is off an error message is not displayed even if it has been set using <code>error_message</code>. It is on by default.</p>
<h1><a class="anchor" id="ww_data_validate_examples"></a>
Examples</h1>
<div class="fragment"><div class="line"><span class="comment">// Restrict input to an integer between 1 and 10.</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a>   = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a>   = 10;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Restrict input to an integer not between 1 and 10 (using cell references).</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a5103f918e00ebc26d50adda3b4cd3026">minimum_formula</a>  = <span class="stringliteral">&quot;=E3&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ab1acd165475bda9af44e8e27d93c0df3">maximum_formula</a>  = <span class="stringliteral">&quot;=F3&quot;</span>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Restrict input to a decimal between 0.1 and 0.5.</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a>   = 0.1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a>   = 0.5;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Select a value from a drop down list.</span></div>
<div class="line"><span class="keywordtype">char</span> *list[]                      = {<span class="stringliteral">&quot;open&quot;</span>, <span class="stringliteral">&quot;high&quot;</span>, <span class="stringliteral">&quot;close&quot;</span>, NULL};</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7168c44107ed6b5c63f6b701b69cc50b">value_list</a>       = list;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Select a value from a drop down list (using a cell range).</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a>    = <span class="stringliteral">&quot;=$E$4:$G$4&quot;</span>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Restrict input to a date between 1/1/2008 and 12/12/2008.</span></div>
<div class="line"><a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime1            = {2008,  1,  1, 0, 0, 0};</div>
<div class="line"><a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime2            = {2008, 12, 12, 0, 0, 0};</div>
<div class="line"> </div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a9879f8968affead0bc9245ade4ae32aa">minimum_datetime</a> = datetime1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aa1c41a46845b8dbbbba0c249517e9530">maximum_datetime</a> = datetime2;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Restrict input to a string longer than 3 characters.</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a>     = 3;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Restrict input to a value if a formula is true.</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18">LXW_VALIDATION_TYPE_CUSTOM_FORMULA</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a>    = <span class="stringliteral">&quot;=AND(F5=50,G5=60)&quot;</span>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Display a custom info message when integer isn&#39;t between 1 and 100.</span></div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a>   = 1;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a>   = 100;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">input_title</a>      = <span class="stringliteral">&quot;Enter an integer:&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">input_message</a>    = <span class="stringliteral">&quot;between 1 and 100&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a3d2c14ba7d150130b18ee90e7bdea9c4">error_title</a>      = <span class="stringliteral">&quot;Input value is not valid!&quot;</span>;</div>
<div class="line">data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ad021ae9515ce8624db6819667dc10dc9">error_message</a>    = <span class="stringliteral">&quot;It should be an integer between 1 and 100&quot;</span>;</div>
</div><!-- fragment --><p>For a full example see <a class="el" href="data_validate_8c-example.html">data_validate.c</a>.</p>
<p>Next: <a class="el" href="working_with_conditional_formatting.html">Working with Conditional Formatting</a> </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<div class="ttc" id="astructlxw__data__validation_html_aba116e382c2276bd68fd910a73b6bf64"><div class="ttname"><a href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">lxw_data_validation::value_formula</a></div><div class="ttdeci">char * value_formula</div><div class="ttdef"><b>Definition:</b> worksheet.h:858</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a7d648cb7da5e14cb1ba1c446cd91f93f"><div class="ttname"><a href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">lxw_data_validation::criteria</a></div><div class="ttdeci">uint8_t criteria</div><div class="ttdef"><b>Definition:</b> worksheet.h:807</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a0bb3f10cde1f055b844c10a2a75f0ac6"><div class="ttname"><a href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">lxw_data_validation::input_message</a></div><div class="ttdeci">char * input_message</div><div class="ttdef"><b>Definition:</b> worksheet.h:938</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a93759c9248dd4a2f298a18f04db55a3b"><div class="ttname"><a href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">lxw_data_validation::input_title</a></div><div class="ttdeci">char * input_title</div><div class="ttdef"><b>Definition:</b> worksheet.h:929</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca4a21e111494a0927a836e38037164296"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca4a21e111494a0927a836e38037164296">LXW_VALIDATION_TYPE_TIME_FORMULA</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_TIME_FORMULA</div><div class="ttdef"><b>Definition:</b> worksheet.h:144</div></div>
<div class="ttc" id="astructlxw__data__validation_html"><div class="ttname"><a href="structlxw__data__validation.html">lxw_data_validation</a></div><div class="ttdoc">Worksheet data validation options.</div><div class="ttdef"><b>Definition:</b> worksheet.h:796</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a9879f8968affead0bc9245ade4ae32aa"><div class="ttname"><a href="structlxw__data__validation.html#a9879f8968affead0bc9245ade4ae32aa">lxw_data_validation::minimum_datetime</a></div><div class="ttdeci">lxw_datetime minimum_datetime</div><div class="ttdef"><b>Definition:</b> worksheet.h:901</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a1ca1d3d0e6fdf634034228713ef5d34c"><div class="ttname"><a href="structlxw__data__validation.html#a1ca1d3d0e6fdf634034228713ef5d34c">lxw_data_validation::ignore_blank</a></div><div class="ttdeci">uint8_t ignore_blank</div><div class="ttdef"><b>Definition:</b> worksheet.h:813</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a88b1a98df0ec6ca3509a2af95ff80b5e"><div class="ttname"><a href="structlxw__data__validation.html#a88b1a98df0ec6ca3509a2af95ff80b5e">lxw_data_validation::value_datetime</a></div><div class="ttdeci">lxw_datetime value_datetime</div><div class="ttdef"><b>Definition:</b> worksheet.h:883</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a3d2c14ba7d150130b18ee90e7bdea9c4"><div class="ttname"><a href="structlxw__data__validation.html#a3d2c14ba7d150130b18ee90e7bdea9c4">lxw_data_validation::error_title</a></div><div class="ttdeci">char * error_title</div><div class="ttdef"><b>Definition:</b> worksheet.h:946</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_LENGTH</div><div class="ttdef"><b>Definition:</b> worksheet.h:152</div></div>
<div class="ttc" id="astructlxw__data__validation_html_acc19c667d02e2e5e917216bc077b2ade"><div class="ttname"><a href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">lxw_data_validation::minimum_number</a></div><div class="ttdeci">double minimum_number</div><div class="ttdef"><b>Definition:</b> worksheet.h:889</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca823e5e00d1a36b40579f998b4704ddb5"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca823e5e00d1a36b40579f998b4704ddb5">LXW_VALIDATION_TYPE_INTEGER_FORMULA</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_INTEGER_FORMULA</div><div class="ttdef"><b>Definition:</b> worksheet.h:114</div></div>
<div class="ttc" id="astructlxw__data__validation_html_abc1601dcfcd8e7d7172984fb34e14626"><div class="ttname"><a href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">lxw_data_validation::maximum_number</a></div><div class="ttdeci">double maximum_number</div><div class="ttdef"><b>Definition:</b> worksheet.h:907</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a7168c44107ed6b5c63f6b701b69cc50b"><div class="ttname"><a href="structlxw__data__validation.html#a7168c44107ed6b5c63f6b701b69cc50b">lxw_data_validation::value_list</a></div><div class="ttdeci">char ** value_list</div><div class="ttdef"><b>Definition:</b> worksheet.h:877</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_DECIMAL</div><div class="ttdef"><b>Definition:</b> worksheet.h:117</div></div>
<div class="ttc" id="autility_8h_html_a4dbbdfc9b616195c799dee78e727cecc"><div class="ttname"><a href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a></div><div class="ttdeci">#define RANGE(range)</div><div class="ttdoc">Convert an Excel A1:B2 range into a (first_row, first_col, last_row, last_col) sequence.</div><div class="ttdef"><b>Definition:</b> utility.h:82</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_GREATER_THAN</div><div class="ttdef"><b>Definition:</b> worksheet.h:183</div></div>
<div class="ttc" id="astructlxw__data__validation_html_ab1acd165475bda9af44e8e27d93c0df3"><div class="ttname"><a href="structlxw__data__validation.html#ab1acd165475bda9af44e8e27d93c0df3">lxw_data_validation::maximum_formula</a></div><div class="ttdeci">char * maximum_formula</div><div class="ttdef"><b>Definition:</b> worksheet.h:913</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18">LXW_VALIDATION_TYPE_CUSTOM_FORMULA</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_CUSTOM_FORMULA</div><div class="ttdef"><b>Definition:</b> worksheet.h:160</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca5d77c63d440a5ecedc33ce41d7d60521"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca5d77c63d440a5ecedc33ce41d7d60521">LXW_VALIDATION_TYPE_TIME</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_TIME</div><div class="ttdef"><b>Definition:</b> worksheet.h:141</div></div>
<div class="ttc" id="astructlxw__datetime_html"><div class="ttname"><a href="structlxw__datetime.html">lxw_datetime</a></div><div class="ttdoc">Struct to represent a date and time in Excel.</div><div class="ttdef"><b>Definition:</b> common.h:152</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_LIST</div><div class="ttdef"><b>Definition:</b> worksheet.h:124</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a9afa5c82f4d99384298ed4d16facc5cb"><div class="ttname"><a href="structlxw__data__validation.html#a9afa5c82f4d99384298ed4d16facc5cb">lxw_data_validation::show_input</a></div><div class="ttdeci">uint8_t show_input</div><div class="ttdef"><b>Definition:</b> worksheet.h:822</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_INTEGER</div><div class="ttdef"><b>Definition:</b> worksheet.h:110</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a4495d388fd38d3824db6d8b7af3cdecc"><div class="ttname"><a href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">lxw_data_validation::validate</a></div><div class="ttdeci">uint8_t validate</div><div class="ttdef"><b>Definition:</b> worksheet.h:801</div></div>
<div class="ttc" id="aworksheet_8h_html_a00c0cb6be9a2864d2a4cc977eadea74ba9d4f1bdb9ed0a87ffad0153c85feb786"><div class="ttname"><a href="worksheet_8h.html#a00c0cb6be9a2864d2a4cc977eadea74ba9d4f1bdb9ed0a87ffad0153c85feb786">LXW_VALIDATION_OFF</a></div><div class="ttdeci">@ LXW_VALIDATION_OFF</div><div class="ttdef"><b>Definition:</b> worksheet.h:98</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca4c4cbe18adcd6bef7cadf8f3b467b795"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca4c4cbe18adcd6bef7cadf8f3b467b795">LXW_VALIDATION_TYPE_LIST_FORMULA</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_LIST_FORMULA</div><div class="ttdef"><b>Definition:</b> worksheet.h:128</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a5103f918e00ebc26d50adda3b4cd3026"><div class="ttname"><a href="structlxw__data__validation.html#a5103f918e00ebc26d50adda3b4cd3026">lxw_data_validation::minimum_formula</a></div><div class="ttdeci">char * minimum_formula</div><div class="ttdef"><b>Definition:</b> worksheet.h:895</div></div>
<div class="ttc" id="astructlxw__data__validation_html_ae57eda5fa066ce0d318f290a759631b7"><div class="ttname"><a href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">lxw_data_validation::value_number</a></div><div class="ttdeci">double value_number</div><div class="ttdef"><b>Definition:</b> worksheet.h:851</div></div>
<div class="ttc" id="astructlxw__data__validation_html_ad021ae9515ce8624db6819667dc10dc9"><div class="ttname"><a href="structlxw__data__validation.html#ad021ae9515ce8624db6819667dc10dc9">lxw_data_validation::error_message</a></div><div class="ttdeci">char * error_message</div><div class="ttdef"><b>Definition:</b> worksheet.h:957</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a18e5d9f622c710bd3997164f67871eb2"><div class="ttname"><a href="structlxw__data__validation.html#a18e5d9f622c710bd3997164f67871eb2">lxw_data_validation::dropdown</a></div><div class="ttdeci">uint8_t dropdown</div><div class="ttdef"><b>Definition:</b> worksheet.h:845</div></div>
<div class="ttc" id="aworksheet_8h_html_a14f482010dd0f817e17001d01644a57f"><div class="ttname"><a href="worksheet_8h.html#a14f482010dd0f817e17001d01644a57f">worksheet_data_validation_range</a></div><div class="ttdeci">lxw_error worksheet_data_validation_range(lxw_worksheet *worksheet, lxw_row_t first_row, lxw_col_t first_col, lxw_row_t last_row, lxw_col_t last_col, lxw_data_validation *validation)</div><div class="ttdoc">Add a data validation to a range.</div></div>
<div class="ttc" id="aworksheet_8h_html_a70c4b9cfb27b18258117545ac6ce6da0"><div class="ttname"><a href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a></div><div class="ttdeci">lxw_error worksheet_data_validation_cell(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, lxw_data_validation *validation)</div><div class="ttdoc">Add a data validation to a cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_DATE</div><div class="ttdef"><b>Definition:</b> worksheet.h:131</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_NOT_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:174</div></div>
<div class="ttc" id="autility_8h_html_ad510ac6df573d23203374e24dba373d2"><div class="ttname"><a href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a></div><div class="ttdeci">#define CELL(cell)</div><div class="ttdoc">Convert an Excel A1 cell string into a (row, col) pair.</div><div class="ttdef"><b>Definition:</b> utility.h:45</div></div>
<div class="ttc" id="astructlxw__data__validation_html_aa1c41a46845b8dbbbba0c249517e9530"><div class="ttname"><a href="structlxw__data__validation.html#aa1c41a46845b8dbbbba0c249517e9530">lxw_data_validation::maximum_datetime</a></div><div class="ttdeci">lxw_datetime maximum_datetime</div><div class="ttdef"><b>Definition:</b> worksheet.h:919</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:171</div></div>
<!-- HTML footer for doxygen 1.8.20-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Copyright 2014-2020 John McNamara.
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
